import 'antd/dist/reset.css';
import 'react-toastify/dist/ReactToastify.css';

import { StrictMode } from 'react';
import * as ReactDOM from 'react-dom/client';
import { ToastContainer } from 'react-toastify';

import { ApiDictionaryProvider } from '@donnu-prod-practice/dal';

import App from './app/App';
import { api } from './app/services/api';

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement);
root.render(
  <StrictMode>
    <ApiDictionaryProvider value={api}>
      <>
        <App />

        <ToastContainer
          position="bottom-right"
          autoClose={3000}
          hideProgressBar={false}
          newestOnTop={false}
          closeOnClick
          rtl={false}
          pauseOnFocusLoss
          draggable
          pauseOnHover
        />
      </>
    </ApiDictionaryProvider>
  </StrictMode>
);
